﻿use master
go
create database Blogs
go
use Blogs
go
if exists(select * from sysobjects where name='Users')
drop table Users
create table Users
(id int primary key identity(1,1),
Username nvarchar(50) not null,
Passwords nvarchar(50) not null
)
if exists(select * from sysobjects where name='Articles')
drop table Articles
create table Articles
(
id int primary key identity(1,1),
Title nvarchar(50) not null,
Author nvarchar(50) not null,
CreatedTime nvarchar(20) default CONVERT(nvarchar(20),GETDATE(),20) 
)
go
insert into Users(Username,Passwords) values('派大星','pdx123')

insert into Articles(Title,Author) values('围城','钱锤书'),
('四世同堂','老舍'),
('家','巴金'),
('活着','余华'),
('城南旧事','林海音'),
('呐喊','鲁迅'),
('边城','沈从文'),
('白鹿原','陈忠实'),
('未央歌','鹿桥'),
('金华烟云','林语堂')

select * from Articles
select * from Users
